import QtQuick 2.13
import QtQuick.Controls 2.13

ApplicationWindow {
    id: mainWindow
    title: "IDEa"
    width: 800
    height: 600
    visible: true

    menuBar: MenuBar {
                Menu {
                    id: reloadMenu
                    title: "Reload"

                    MenuItem {
                        text: "Reload"
                        onClicked: {
                            console.log("reloading...")
                            reloader.reload()
                            console.log("done.")
                        }
                    }
                }
            }

    Loader {
        id: reloader

        function reload() {
            source = "";
            uiBridge.ClearCache()
            source = "Editor.qml";
        }
        anchors.fill: parent
        source: "Editor.qml"
    }
}
